/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.hl7.v3;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Related Link Type</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * <!-- begin-model-doc -->
 * specDomain: S21429 (C-0-T11603-S21429-cpt)
 * <!-- end-model-doc -->
 * @see org.hl7.v3.V3Package#getRelatedLinkType()
 * @model extendedMetaData="name='RelatedLinkType'"
 * @generated
 */
public enum RelatedLinkType implements Enumerator {
	/**
	 * The '<em><b>REL</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #REL_VALUE
	 * @generated
	 * @ordered
	 */
	REL(0, "REL", "REL"),

	/**
	 * The '<em><b>DIRAUTH</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #DIRAUTH_VALUE
	 * @generated
	 * @ordered
	 */
	DIRAUTH(1, "DIRAUTH", "DIRAUTH"),

	/**
	 * The '<em><b>INDAUTH</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #INDAUTH_VALUE
	 * @generated
	 * @ordered
	 */
	INDAUTH(2, "INDAUTH", "INDAUTH"),

	/**
	 * The '<em><b>PART</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #PART_VALUE
	 * @generated
	 * @ordered
	 */
	PART(3, "PART", "PART"),

	/**
	 * The '<em><b>BACKUP</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #BACKUP_VALUE
	 * @generated
	 * @ordered
	 */
	BACKUP(4, "BACKUP", "BACKUP"),

	/**
	 * The '<em><b>REPL</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #REPL_VALUE
	 * @generated
	 * @ordered
	 */
	REPL(5, "REPL", "REPL");

	/**
	 * The '<em><b>REL</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>REL</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #REL
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int REL_VALUE = 0;

	/**
	 * The '<em><b>DIRAUTH</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>DIRAUTH</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #DIRAUTH
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int DIRAUTH_VALUE = 1;

	/**
	 * The '<em><b>INDAUTH</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>INDAUTH</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #INDAUTH
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int INDAUTH_VALUE = 2;

	/**
	 * The '<em><b>PART</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>PART</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #PART
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int PART_VALUE = 3;

	/**
	 * The '<em><b>BACKUP</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>BACKUP</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #BACKUP
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int BACKUP_VALUE = 4;

	/**
	 * The '<em><b>REPL</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>REPL</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #REPL
	 * @model
	 * @generated
	 * @ordered
	 */
	public static final int REPL_VALUE = 5;

	/**
	 * An array of all the '<em><b>Related Link Type</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final RelatedLinkType[] VALUES_ARRAY =
		new RelatedLinkType[] {
			REL,
			DIRAUTH,
			INDAUTH,
			PART,
			BACKUP,
			REPL,
		};

	/**
	 * A public read-only list of all the '<em><b>Related Link Type</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<RelatedLinkType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Related Link Type</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static RelatedLinkType get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			RelatedLinkType result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Related Link Type</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static RelatedLinkType getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			RelatedLinkType result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Related Link Type</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static RelatedLinkType get(int value) {
		switch (value) {
			case REL_VALUE: return REL;
			case DIRAUTH_VALUE: return DIRAUTH;
			case INDAUTH_VALUE: return INDAUTH;
			case PART_VALUE: return PART;
			case BACKUP_VALUE: return BACKUP;
			case REPL_VALUE: return REPL;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private RelatedLinkType(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //RelatedLinkType
